package com.zhu.transaction.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author zhu
 * @since 2021-01-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "TMessage对象", description = "")
public class Message implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "留言用户")
    private String sendUser;

    @ApiModelProperty(value = "接受用户")
    private String receiveUser;

    private User sendUserPojo;

    private User receiveUserPojo;

    @ApiModelProperty(value = "留言内容")
    private String content;

    @ApiModelProperty(value = "消息状态", example = "1")
    private Integer messageState;

    @ApiModelProperty(value = "消息类型", example = "1")
    private Integer messageType;

    @ApiModelProperty(value = "留言时间")
    private Date time;

    public String getStringTime() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.time);
    }
}
